package com.example.gerenciadoralunofatec_pg;


import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.widget.EditText;
import android.app.Activity;
import android.content.Intent;
public class NovaNota extends Activity {
	public EditText notaP1;
	public EditText notaP2;
	public EditText notaTP;
	public EditText Materia;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_nova_nota);
		notaP1 = (EditText)findViewById(R.id.editTextP1);
		notaP2 = (EditText)findViewById(R.id.editTextP2);
		notaTP = (EditText)findViewById(R.id.editTextmateria);
		Materia = (EditText)findViewById(R.id.editTexttarefa);
			}
	
public void adicionaNota(View view){
	Intent addNota = new Intent(this, Notas.class);
	String notap1  = notaP1.getText().toString();
	String notap2  = notaP2.getText().toString();
	String notatp  = notaTP.getText().toString();
	String materia = Materia.getText().toString();
	addNota.putExtra("notap1", notap1); //Enviar
	addNota.putExtra("notap2", notap2); //Enviar
	addNota.putExtra("notatp", notatp); //Enviar
	addNota.putExtra("materia", materia); //Enviar
	startActivity(addNota);
	}
	
	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.nova_nota, menu);
		return true;
	}

}
